/***********************************************************
 
 File name: UIView+Line.m
 Author: xuwei
 Description:
 关于分割线的封装
 
 History:
 2018/02/28: Created
 
 ************************************************************/

#import "UIView+Line.h"

@implementation UIView (Line)
/**
 根据frame和color创建下划线
 
 @param frame frame
 @param color 颜色
 @return 下划线
 */
+ (UIView *)lineWithFrame:(CGRect)frame
                        color:(UIColor *)color {
    UIView *lineView = [[UIView alloc] initWithFrame:frame];
    lineView.backgroundColor = color;
    return lineView;
}

/**
 根据frame创建下划线
 
 颜色默认为透明度为0.1的黑色
 @param frame frame
 @return 下划线
 */
+ (UIView *)lineWithFrame:(CGRect)frame {
    UIColor *color = [UIColor colorWithHexString:kSeperatedColor];
    return [self lineWithFrame:frame color:color];
}

@end
